5a267035204f2663616d801ed5f2ed799b73fff4,backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidLiveWallpaperService.java,AndroidWallpaperEngine,onResume,#,135

Before Change



		public void onResume () {
			if (AndroidLiveWallpaperService.DEBUG) Log.d(AndroidLiveWallpaperService.this.TAG, " > onResume() " + hashCode() + ", running: " + runningEngines);
			app.onResume();
			view.onResume();
		}

After Change


			visibleEngines ++;
			if (DEBUG) Log.d(TAG, " > AndroidWallpaperEngine - onResume() " + hashCode() + ", running: " + engines + ", linked: " + (linkedEngine == this) + ", visible: " + visibleEngines);
			
			if (linkedEngine != null) {
				if (linkedEngine != this) {
					setLinkedEngine(this);
					view.surfaceDestroyed(getSurfaceHolder());	// force gl surface reload, new instance will be created on current surface holder
					view.surfaceCreated(getSurfaceHolder());
				}
				
				if (visibleEngines == 1)
					app.onResume();
	
				if (waitingSurfaceChangedEvent != null)
					waitingSurfaceChangedEvent.run();